// 采购销售接口
import request from "../http.js"

const api = {
	'list': '/erp/voucherDesign/list', //  获取自定义表头/明细/表尾
	'listhouses': '/in/warehouse/listMyOperationInWarehouses', // 获取厂库
	'pageList': '/erp/purchaseType/pageList',	// 获取采购类型
	'pageForVoucher': '/crm/customer/pageForVoucher',	// 获取供应商
	'getList': '/in/inventory/getList',	// 获取物料
	'inventorypageList': '/in/inventory/getByCode',	// 物料列表
	'recordsave': '/inOut/recordMain/save',	// 入库保存
	'eliverysave': '/so/deliveryMain/save',	// 发货通知单保存
	'deliverysubmit': '/so/deliveryMain/submit',	// 退货单提交
	'liveryexamine':'/so/deliveryMain/examine', // 退货单审核
	
	
	'ForVoucher': '/crm/customer/pageForVoucher',	// 获取客户
	'BarCode': '/so/areaCalculation/analysisByBarCode',	// 获取发货单
	'nssave':'/erp/nsInOutMain/save',	// 保存发货单
	'DynamicById': '/erp/voucherDesign/voucherDynamicById',	// 获取入库单详情
	'getInList':'/in/inventoryClass/getInventoryClassList',	// 获取物料分类
	'inpageList': '/in/inventory/pageList',	//获取物料
	'recorddelete': '/inOut/recordMain/delete',	// 物料删除
	
	'savecode': '/erp/nsInOutMain/saveFromBarcode',	// 发货单
	
	'purchasesubmit': '/inOut/recordMain/submit',	// 采购入库提交/撤回
	'examine': '/inOut/recordMain/examine',	// 采购审核/弃审
	'inconfirm': '/inOut/recordMain/confirm',	//入库
	
	'Plist': '/erp/reportProgramme/list',	// 获取查询方案列表
	'voucherPage': '/erp/voucherDesign/voucherDynamicPage',	// 查询
	
	'saveAndConfirm': '/inOut/recordMain/saveAndConfirm', // 扫码出入库
	
	
	'CheckgetCode': '/in/inventoryCheck/getCode',	// 获取判断单编码
	'warehouseList': '/in/warehouse/pageList',	// 获取仓库
	'systempage': '/system/office/page',	// 获取部门
	'getBytion': '/in/inventoryInfo/pageInInventoryCheckSearchVo',	 // 获取盘存列表
	'inventorysave': '/in/inventoryCheck/save',	// 盘点提交
	'Checktion': '/in/inventoryCheck/getOneByCondition',	// 盘点数据回显
	
	
	'pickSaveApi':'/production/pickReturn/save',//领料申请保存
	
	'submit': '/production/pickReturn/submit',	// 领退料提交
	'proexamine': '/production/pickReturn/examine',	//领退料审核
	
	'StorageOnHandVo': '/inOut/recordMain/statisticStorageOnHandVo',	// 现存量查询
	'RecordDetailVo': '/inOut/recordMain/statisticInOutRecordDetailVo',	// 出入库流水查询
	'SummaryVop': '/inOut/recordMain/statisticInOutRecordDetailParentSummaryVo',	//出入库汇总查询
	'ParentSummaryVo': '/inOut/recordMain/statisticInOutRecordSDParentSummaryVo',	// 收发汇总搜索
	'staBookVo': '/inOut/recordMain/statisticInventoryStandingBookVo',	// 台账搜索
	
	'periodlist': '/erp/period/list',	// 期间获取
	
	'pickRedelete': '/production/pickReturn/delete',	//领退料删除
	'delidelete': '/so/deliveryMain/delete',	// 发货单删除
	
	'unitPageList': '/in/unit/pageList',	// 获取计量单位
}

// 获取计量单位
export function unitPageList(data){
	return request({
		url: api.unitPageList,
		method: 'GET',
		contentType:'application/json',
		data:data
	})
} 


// 领退料删除
export function delidelete(data){
	return request({
		url: api.delidelete + '?id=' + data,
		method: 'DELETE',
		contentType:'application/json',
		data:data
	})
} 

// 领退料删除
export function pickRedelete(data){
	return request({
		url: api.pickRedelete + '?id=' + data,
		method: 'DELETE',
		contentType:'application/json',
		data:data
	})
} 

// 台账搜索
export function staBookVo(data){
	return request({
		url: api.staBookVo,
		method: 'POST',
		contentType:'application/json',
		data:data
	})
} 


// 期间获取
export function periodlist(data){
	return request({
		url: api.periodlist,
		method: 'GET',
		contentType:'application/json',
		data:data
	})
} 


// 收发汇总搜索
export function ParentSummaryVo(data){
	return request({
		url: api.ParentSummaryVo,
		method: 'POST',
		contentType:'application/json',
		data:data
	})
} 


// 出入库汇总查询
export function SummaryVop(data){
	return request({
		url: api.SummaryVop,
		method: 'POST',
		contentType:'application/json',
		data:data
	})
} 

// 出入库流水
export function RecordDetailVo(data){
	return request({
		url: api.RecordDetailVo,
		method: 'POST',
		contentType:'application/json',
		data:data
	})
} 

// 现存量查询
export function StorageOnHandVo(data){
	return request({
		url: api.StorageOnHandVo,
		method: 'GET',
		contentType:'application/json',
		data:data
	})
} 


// 领退料提交
export function proexamine(data){
	return request({
		url: api.proexamine,
		method: 'GET',
		contentType:'application/json',
		data:data
	})
} 


// 领退料提交
export function lop_submit(data){
	return request({
		url: api.submit,
		method: 'GET',
		contentType:'application/json',
		data:data
	})
} 

// 盘点数据回显
export function Checktion(data){
	return request({
		url: api.Checktion,
		method: 'GET',
		contentType:'application/json',
		data:data
	})
} 

// 盘点提交
export function inventorysave(data){
	return request({
		url: api.inventorysave,
		method: 'POST',
		contentType:'application/json',
		data:data
	})
} 


// 获取盘存列表
export function getBytion(data){
	return request({
		url: api.getBytion,
		method: 'GET',
		contentType:'application/json',
		data:data
	})
} 


// 获取判断单编码
export function systempage(data){
	return request({
		url: api.systempage,
		method: 'GET',
		contentType:'application/json',
		data:data
	})
} 

// 获取判断单编码
export function warehouseList(data){
	return request({
		url: api.warehouseList,
		method: 'GET',
		contentType:'application/json',
		data:data
	})
} 

// 获取判断单编码
export function CheckgetCode(data){
	return request({
		url: api.CheckgetCode,
		method: 'GET',
		contentType:'application/json',
		data:data
	})
} 

// 退货单审核
export function saveAndConfirm(data){
	return request({
		url: api.saveAndConfirm,
		method: 'POST',
		contentType:'application/json',
		data:data
	})
} 


// 退货单审核
export function liveryexamine(data){
	return request({
		url: api.liveryexamine,
		method: 'GET',
		contentType:'application/json',
		data:data
	})
} 


// 退货单提交
export function deliverysubmit(data){
	return request({
		url: api.deliverysubmit,
		method: 'GET',
		contentType:'application/json',
		data:data
	})
} 


// 发货通知单保存
export function eliverysave(data){
	return request({
		url: api.eliverysave,
		method: 'POST',
		contentType:'application/json',
		data:data
	})
} 


// 获取查询结果
export function voucherPage(data){
	return request({
		url: api.voucherPage,
		method: 'POST',
		contentType:'application/json',
		data:data
	})
} 


// 获取查询方案列表
export function inconfirm(data){
	return request({
		url: api.inconfirm,
		method: 'GET',
		contentType:'application/json',
		data:data
	})
} 


// 获取查询方案列表
export function Plist(data){
	return request({
		url: api.Plist,
		method: 'GET',
		contentType:'application/json',
		data:data
	})
} 

// 采购审核
export function examine(data){
	return request({
		url: api.examine,
		method: 'GET',
		contentType:'application/json',
		data:data
	})
} 


// 采购入库提交
export function purchasesubmit(data){
	return request({
		url: api.purchasesubmit,
		method: 'GET',
		contentType:'application/json',
		data:data
	})
} 


// 删除
export function recorddelete(data){
	return request({
		url: api.recorddelete + '?id=' + data,
		method: 'DELETE',
		contentType:'application/json',
		data:data
	})
} 


// 获取物料 
export function inpageList(data) {
	console.log(data);
	return request({
		url: api.inpageList,
		method: 'GET',
		contentType: 'application/json',
		data: data
	})
}


// 获取入库单详情 
export function getInList(data) {
	return request({
		url: api.getInList,
		method: 'GET',
		contentType: 'application/json',
		data: data
	})
}


// 获取入库单详情
export function DynamicById(data) {
	return request({
		url: api.DynamicById,
		method: 'GET',
		contentType: 'application/json',
		data: data
	})
}


// 获取发货单
export function savecode(data) {
	return request({
		url: api.savecode,
		method: 'GET',
		contentType: 'application/json',
		data: data
	})
}


// 获取发货单
export function nssave(data) {
	return request({
		url: api.nssave,
		method: 'POST',
		contentType: 'application/json',
		data: data
	})
}

// 获取发货单
export function BarCode(data) {
	return request({
		url: api.BarCode,
		method: 'GET',
		contentType: 'application/json',
		data: data
	})
}

// 获取供应商
export function ForVoucher(data) {
	return request({
		url: api.ForVoucher,
		method: 'GET',
		contentType: 'application/json',
		data: data
	})
}


// 入库保存
export function recordsave(data) {
	return request({
		url: api.recordsave,
		method: 'POST',
		contentType: 'application/json',
		data: data
	})
}


// 获取供应商
export function inventorypageList(data) {
	return request({
		url: api.inventorypageList,
		method: 'GET',
		contentType: 'application/json',
		data: data
	})
}


// 获取物料
export function getList(data) {
	return request({
		url: api.getList,
		method: 'GET',
		contentType: 'application/json',
		data: data
	})
}

// 获取供应商
export function pageForVoucher(data) {
	return request({
		url: api.pageForVoucher,
		method: 'GET',
		contentType: 'application/json',
		data: data
	})
}


// 获取采购类型
export function pageList(data) {
	return request({
		url: api.pageList,
		method: 'GET',
		contentType: 'application/json',
		data: data
	})
}


// 获取厂库
export function listhouses(data) {
	return request({
		url: api.listhouses,
		method: 'GET',
		contentType: 'application/json',
		data: data
	})
}

// 获取表数据
export function list(data) {
	return request({
		url: api.list,
		method: 'GET',
		contentType: 'application/json',
		data: data
	})
}


//领料申请
export function pickApplySave(data) {
	return request({
		url: api.pickSaveApi,
		method: 'POST',
		contentType: 'application/json',
		data: data
	})
}

